<%@ page import="com.project.User" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>用户信息</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link rel="stylesheet" href="css/userInfo.css">
</head>
<body>
<%@ include file="userNavbar.jsp" %>

<h1 class="text-3xl font-bold text-gray-800 mb-6 mt-16">用户信息</h1>
<div class="info-card">
  <p><strong>用户ID:</strong> <%= session.getAttribute("user") != null ? ((User) session.getAttribute("user")).getUid() : "未登录" %></p>
  <p><strong>姓名:</strong> <%= session.getAttribute("user") != null ? ((User) session.getAttribute("user")).getName() : "未知" %></p>
  <p><strong>邮箱:</strong> <%= session.getAttribute("user") != null ? ((User) session.getAttribute("user")).getEmail() : "未知" %></p>
  <p><strong>电话:</strong> <%= session.getAttribute("user") != null ? ((User) session.getAttribute("user")).getPhone() : "未知" %></p>
</div>
<div class="nav-buttons">
  <a href="userMain.jsp" class="nav-btn">返回上一级</a>
  <a href="editUserInfo.jsp" class="nav-btn">修改信息</a>
</div>
</body>
</html>